using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;


namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class CCCommentMap : EntityTypeConfiguration<CCComment>
    {
        public CCCommentMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.comments)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("CCComments");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.contactusid).HasColumnName("contactusid");
            this.Property(t => t.comments).HasColumnName("comments");
        }
    }
}
